Pod::Spec.new do |s|
  s.name         = "BaiduMapKit"
  s.version      = "4.3.2"
  s.summary      = "百度地图iOS SDK CocoaPods百度地图官方库"
  s.description  = <<-DESC
      百度地图iOS SDK：百度地图官方CocoaPods.
      百度地图iOS SDK是一套基于iOS 5.0及以上版本设备的应用程序接口，不仅提供展示地图的基本接口，还提供POI检索、路径规划、地图标注、离线地图、定位、周边雷达等丰富的LBS能力
                   DESC
  
  s.homepage     = "http://developer.baidu.com/map/index.php?title=iossdk"
  s.license      = { :type =>"MIT", :file => "LICENSE" }
  s.authors      = { "baidu" => "loc-rd@baidu.com" }
  s.platform     = :ios, "8.0"
  s.source       = { :git => "https://github.com/shlowdy/BaiduMapKit.git", :tag => "#{s.version}", :submodules => true }

  s.frameworks   = "CoreLocation", "QuartzCore", "OpenGLES", "SystemConfiguration", "CoreGraphics", "Security"
  s.libraries    = "sqlite3.0", "c++"
  s.requires_arc = true

  s.source_files        = "BaiduMapKit/*.framework/Headers/*.h"
  s.public_header_files = "BaiduMapKit/*.framework/Headers/*.h"
  s.vendored_frameworks = "BaiduMapKit/*.framework"
  s.resources           = "BaiduMapKit/BaiduMapAPI_Map.framework/mapapi.bundle"
  s.vendored_libraries  = "BaiduMapKit/thirdlibs/*.a"

  s.subspec 'Base' do |ss|
    ss.ios.deployment_target = '8.0'
    ss.source_files = "BaiduMapKit/BaiduMapAPI_Base.framework/Headers/**.h"
    ss.public_header_files = "BaiduMapKit/BaiduMapAPI_Base.framework/Headers/**.h"
    ss.frameworks   = "CoreLocation", "QuartzCore", "OpenGLES", "SystemConfiguration", "CoreGraphics", "Security"
    ss.libraries    = "sqlite3.0", "c++"
    ss.vendored_frameworks = "BaiduMapKit/BaiduMapAPI_Base.framework"
    ss.vendored_libraries  = "BaiduMapKit/thirdlibs/*.a"
  end

  s.subspec 'Cloud' do |ss|
    ss.ios.dependency "BaiduMapKit/Base"
    ss.ios.deployment_target = '8.0'
    ss.source_files = "BaiduMapKit/BaiduMapAPI_Cloud.framework/Headers/**.h"
    ss.public_header_files = "BaiduMapKit/BaiduMapAPI_Cloud.framework/Headers/**.h"
    ss.frameworks   = "CoreLocation", "QuartzCore", "OpenGLES", "SystemConfiguration", "CoreGraphics", "Security"
    ss.libraries    = "sqlite3.0", "c++"
    ss.vendored_frameworks = "BaiduMapKit/BaiduMapAPI_Cloud.framework"
    ss.vendored_libraries  = "BaiduMapKit/thirdlibs/*.a"
  end

  s.subspec 'Map' do |ss|
    ss.ios.dependency "BaiduMapKit/Base"
    ss.ios.deployment_target = '8.0'
    ss.source_files = "BaiduMapKit/BaiduMapAPI_Map.framework/Headers/**.h"
    ss.public_header_files = "BaiduMapKit/BaiduMapAPI_Map.framework/Headers/**.h"
    ss.frameworks   = "CoreLocation", "QuartzCore", "OpenGLES", "SystemConfiguration", "CoreGraphics", "Security"
    ss.libraries    = "sqlite3.0", "c++"
    ss.vendored_frameworks = "BaiduMapKit/BaiduMapAPI_Map.framework"
    ss.resources = "BaiduMapKit/BaiduMapAPI_Map.framework/mapapi.bundle"
    ss.vendored_libraries  = "BaiduMapKit/thirdlibs/*.a"
  end

  s.subspec 'Search' do |ss|
    ss.ios.dependency "BaiduMapKit/Base"
    ss.ios.deployment_target = '8.0'
    ss.source_files = "BaiduMapKit/BaiduMapAPI_Search.framework/Headers/**.h"
    ss.public_header_files = "BaiduMapKit/BaiduMapAPI_Search.framework/Headers/**.h"
    ss.frameworks   = "CoreLocation", "QuartzCore", "OpenGLES", "SystemConfiguration", "CoreGraphics", "Security"
    ss.libraries    = "sqlite3.0", "c++"
    ss.vendored_frameworks = "BaiduMapKit/BaiduMapAPI_Search.framework"
    ss.vendored_libraries  = "BaiduMapKit/thirdlibs/*.a"
  end

  s.subspec 'Utils' do |ss|
    ss.ios.dependency "BaiduMapKit/Base"
    ss.ios.deployment_target = '8.0'
    ss.source_files = "BaiduMapKit/BaiduMapAPI_Utils.framework/Headers/**.h"
    ss.public_header_files = "BaiduMapKit/BaiduMapAPI_Utils.framework/Headers/**.h"
    ss.frameworks   = "CoreLocation", "QuartzCore", "OpenGLES", "SystemConfiguration", "CoreGraphics", "Security"
    ss.libraries    = "sqlite3.0", "c++"
    ss.vendored_frameworks = "BaiduMapKit/BaiduMapAPI_Utils.framework"
    ss.vendored_libraries  = "BaiduMapKit/thirdlibs/*.a"
  end

end

